<?php
/**
 * 用户登录认证
 *
 * @author:  qingkuangs<qingkuangs@gmail.com>
 * @date  :  2011-05-03
 */

if(!defined('PROJECT_ROOT')) {
	exit('Access Denied');
}

if(isset($_REQUEST["sid"]) && !empty($_REQUEST["sid"])) {
	if ($_POST['sid'] == "1df05881811def2b6333a36f7964d4dd" && empty($_SESSION['account'])){
		$_SESSION['account']			= "guoguo";
	} else if ($_POST['sid'] == "zenghuan" && empty($_SESSION['account'])){
		$_SESSION['account']			= "zenghuan";
	} else if ($_POST['sid'] == "wenjun" && empty($_SESSION['account'])){
		$_SESSION['account']			= "wenjun";
	}

	if(!isset($_SESSION['p_id']) && isset($_POST["pid"])) {
		$_SESSION['p_id']	= $_POST["pid"];
	}
	define("FDEBUG",true);
}

$_SESSION["active_time"]	= time();

/*-----------------------------[ 用户登录数据 ]-----------------------------[ begin ]---*/
$arrAuth["account"]			= & $_SESSION["account"];
$arrAuth["p_id"]			= & $_SESSION["p_id"];			//玩家ID
$arrAuth["p_sex"]			= & $_SESSION["p_sex"];			//玩家性别
$arrAuth["p_name"]			= & $_SESSION["p_name"];		//玩家昵称
$arrAuth["p_image"]			= & $_SESSION["p_image"];		//玩家形象
$arrAuth["p_level"]			= & $_SESSION["p_level"];		//玩家等级
$arrAuth["p_character"]		= & $_SESSION["p_character"];	//玩家职业
$arrAuth["physical"]		= & $_SESSION["physical"];		//体力
$arrAuth["physicalt"]		= & $_SESSION["physicalt"];		//体力更新时间
$arrAuth["stature"]			= & $_SESSION["stature"];		//玩家境界
$arrAuth["logintime"]		= & $_SESSION["logintime"];		//登录时间
$arrAuth["active_time"]		= & $_SESSION["active_time"];	//活动时间
$arrAuth["bag_num"]			= & $_SESSION["bag_num"];		//包裹大小
$arrAuth["storage_num"]		= & $_SESSION["storage_num"];	//仓库大小
$arrAuth["city"]			= & $_SESSION["city"];			//场景编号
$arrAuth["start_city"]		= & $_SESSION["start_city"];	//出发城市
$arrAuth["arrival_time"]	= & $_SESSION["arrival_time"];	//到达时间
$arrAuth["event"]			= & $_SESSION["event"];			//事件
$arrAuth["figth"]			= & $_SESSION["figth"];			//战斗

$arrAuth["p_task"]			= & $_SESSION["p_task"];		//任务
$arrAuth["newer"]			= & $_SESSION["newer"];		//任务
$arrAuth["mytip"]			= 0;


?>